:root {
    --sw-gold: #c7a14e;
    --sw-blue: #1a2b3c;
    --sw-header-blue: #5a6e81;
    --sw-text: #222;
    --sw-soak-dark: #8c4a32;
    --sw-soak-light: #e1f0f4;
    --sw-wound-dark: #7c2626;
    --sw-wound-light: #f4e1e1;
    
    /* Dice Colors */
    --dice-green: #2e7d32;
    --dice-yellow: #fdd835;
    --dice-purple: #7b1fa2;
    --dice-red: #c62828;
    --dice-light-blue: #29b6f6;
    --dice-black: #111111;
}

body {
    background-color: #000;
    color: var(--sw-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 0;
}

/* Starfield Background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png') repeat;
  z-index: -1;
}

.character-sheet {
    width: 1100px;
    max-width: 98vw;
    background: white;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.header-left {
    flex-grow: 1;
}

.header-row {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
    padding-bottom: 2px;
}

.header-field {
    margin-right: 20px;
}

.header-field .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    display: block;
}

.header-field .value {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Derived Attributes Blocks */
.derived-attributes {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px;
}

.attribute-block {
    flex: 1;
    text-align: center;
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.attribute-block.soak, .attribute-block.defense {
    border-color: var(--sw-soak-dark);
}

.attribute-block.wounds, .attribute-block.strain {
    border-color: var(--sw-wound-dark);
}

.attribute-header {
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px;
    text-transform: uppercase;
}

.attribute-block.soak .attribute-header, .attribute-block.defense .attribute-header {
    background-color: var(--sw-soak-dark);
}

.attribute-block.wounds .attribute-header, .attribute-block.strain .attribute-header {
    background-color: var(--sw-wound-dark);
}

.attribute-body {
    padding: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    min-height: 40px;
    flex: 1;
}

.attribute-block.soak .attribute-body, .attribute-block.defense .attribute-body {
    background-color: var(--sw-soak-light);
}

.attribute-block.wounds .attribute-body, .attribute-block.strain .attribute-body {
    background-color: var(--sw-wound-light);
}

.attribute-val {
    font-size: 1.8rem;
    font-weight: bold;
}

.attribute-sub {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Characteristics */
.characteristics-container {
    text-align: center;
    margin-bottom: 30px;
}

.characteristics-title {
    background-color: var(--sw-header-blue);
    color: white;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 2px 20px;
    display: inline-block;
    border-radius: 10px;
    margin-bottom: 10px;
}

.characteristics {
    display: flex;
    justify-content: space-around;
    border: 2px solid #ccc;
    border-radius: 40px;
    padding: 10px;
}

.stat-hex {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.stat-circle {
    width: 50px;
    height: 50px;
    border: 3px double #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    background-color: var(--sw-header-blue);
    color: white;
    width: 100%;
    padding: 2px 0;
}

/* Sections */
.section-header {
    background-color: var(--sw-header-blue);
    color: white;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 5px;
    margin-top: 20px;
    border-radius: 5px 5px 0 0;
}

/* Skills Table */
.skills-table {
    width: 100%;
    border-collapse: collapse;
}

.skills-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    border-bottom: 1px solid #ccc;
    padding: 5px;
    text-align: left;
}

.skills-table td {
    padding: 5px;
    border-bottom: 1px dotted #ccc;
}

/* Dice Styles */
.dice-pool { 
    display: flex;
    gap: 4px;
    align-items: center;
}

.dice {
    display: inline-block;
    width: 18px;
    height: 18px;
    position: relative;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Ability - Green Diamond */
.dice-v { 
    background-color: var(--dice-green); 
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); 
}

/* Proficiency - Yellow Hexagon */
.dice-j { 
    background-color: var(--dice-yellow); 
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); 
}

/* Difficulty - Purple Diamond */
.dice-m { 
    background-color: var(--dice-purple); 
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); 
}

/* Challenge - Red Hexagon */
.dice-r { 
    background-color: var(--dice-red); 
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); 
}

/* Boost - Blue Square */
.dice-b { 
    background-color: var(--dice-light-blue); 
    border-radius: 2px;
}

/* Setback - Black Square */
.dice-n { 
    background-color: var(--dice-black); 
    border: 1px solid #444;
    border-radius: 2px;
}

/* Logo Styling */
.logo-box {
    text-align: center;
    border: 1px solid #333;
    padding: 10px;
    font-family: 'Arial Black', Gadget, sans-serif;
    line-height: 1;
}

.logo-sw {
    font-size: 0.6rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 2px;
}

.logo-main {
    font-size: 1.4rem;
    display: block;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    padding: 5px 0;
    margin: 2px 0;
}

.logo-rpg {
    font-size: 0.5rem;
    letter-spacing: 1px;
    display: block;
    margin-top: 2px;
}

.back-link {
    margin-top: 20px;
    color: var(--sw-gold);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.back-link:hover {
    color: #fff;
}

/* Hexagonal Navigation Links */
.hex-link-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.hex-link {
    color: white !important;
    padding: 8px 25px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    display: inline-block;
    min-width: 180px;
    text-align: center;
    transition: transform 0.2s, filter 0.2s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.hex-link:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.hex-link.talents {
    background-color: var(--sw-blue);
    border-bottom: 2px solid var(--sw-header-blue);
}

.hex-link.force {
    background-color: var(--dice-green);
    border-bottom: 2px solid #1b5e20;
}

/* Weapons Table */
.weapons-container {
    margin-top: 30px;
    border: 2px solid #ccc;
    border-radius: 15px;
    padding: 10px;
    position: relative;
}

.weapons-header-hex {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--sw-blue);
    color: white;
    padding: 5px 30px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    min-width: 150px;
    text-align: center;
}

.weapons-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.weapons-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    padding: 5px;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.weapons-table td {
    padding: 10px 5px;
    border-bottom: 1px dotted #ccc;
    font-size: 0.9rem;
}

.weapons-table tr:last-child td {
    border-bottom: none;
}
