* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    max-width: 100%;
}

.color-section,
.font-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: hidden;
}

.color-section h2,
.font-section h2 {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.8em;
    border-bottom: 3px solid #6b21a8;
    padding-bottom: 10px;
}

.color-picker-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.color-picker {
    width: min(400px, 90vw);
    height: min(400px, 90vw);
}

.hue-slider-container {
    width: min(50px, 15vw);
    height: min(400px, 90vw);
}

.color-picker {
    position: relative;
    border: 3px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

#colorCanvas {
    display: block;
    cursor: crosshair;
    width: 100%;
    height: 100%;
}

.color-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
}

.hue-slider-container {
    position: relative;
    border: 3px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

#hueCanvas {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.hue-cursor {
    position: absolute;
    width: 56px;
    height: 8px;
    border: 2px solid white;
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) translateX(-50%);
    left: 50%;
}

.color-info {
    margin-bottom: 25px;
}

.color-preview {
    width: 100%;
    height: 80px;
    border: 3px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-values {
    display: grid;
    gap: 10px;
}

.value-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.value-group label {
    min-width: 80px;
    font-weight: 600;
    color: #4a5568;
}

.value-group input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    background: #f7fafc;
    min-width: 0;
    max-width: 100%;
}

.copy-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #4c1d95 0%, #6b21a8 50%, #581c87 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(76, 29, 149, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c2d12 50%, #6b21a8 100%);
    box-shadow: 0 4px 8px rgba(76, 29, 149, 0.4);
    transform: translateY(-1px);
}

.copy-btn:active {
    background: linear-gradient(135deg, #3c1361 0%, #581c87 50%, #4c1d95 100%);
    transform: scale(0.98);
}

.color-schemes h3 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.3em;
}

.scheme-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.scheme-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4c1d95 0%, #6b21a8 50%, #581c87 100%);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(76, 29, 149, 0.3);
}

.scheme-btn:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c2d12 50%, #6b21a8 100%);
    box-shadow: 0 4px 8px rgba(76, 29, 149, 0.4);
    transform: translateY(-1px);
}

.scheme-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

.scheme-colors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.scheme-controls {
    margin: 15px 0 10px 0;
    text-align: center;
}

.copy-all-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(31, 41, 55, 0.3);
}

.copy-all-btn:hover {
    background: linear-gradient(135deg, #374151 0%, #4b5563 50%, #6b7280 100%);
    box-shadow: 0 4px 8px rgba(31, 41, 55, 0.4);
    transform: translateY(-1px);
}

.copy-all-btn:active {
    transform: scale(0.98);
}

.scheme-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.scheme-color:hover {
    transform: scale(1.1);
}

.scheme-color::after {
    content: attr(data-hex);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7em;
    color: #666;
    white-space: nowrap;
}

.font-controls {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.font-family-selector,
.font-size-control,
.font-weight-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-family-selector label,
.font-size-control label,
.font-weight-control label {
    min-width: 100px;
    font-weight: 600;
    color: #4a5568;
}

#fontSelect,
#fontWeightSelect {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

#fontSizeSlider {
    flex: 1;
    margin-right: 10px;
}

#fontSizeValue {
    min-width: 50px;
    font-weight: 600;
    color: #4a5568;
}

.font-preview {
    margin-bottom: 20px;
}

#fontPreviewText {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    resize: vertical;
    font-size: 24px;
    line-height: 1.4;
    background: #f7fafc;
}

.font-info .value-group {
    margin-top: 15px;
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    .main-content {
        gap: 25px;
    }
    
    .color-section,
    .font-section {
        padding: 20px;
    }
    
    .questions-section {
        padding: 20px;
        margin-top: 25px;
    }
    
    .color-picker {
        width: min(350px, 85vw);
        height: min(350px, 85vw);
    }
    
    .hue-slider-container {
        width: min(45px, 12vw);
        height: min(350px, 85vw);
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .color-picker-container {
        justify-content: center;
    }
    
    .color-picker {
        width: min(320px, 80vw);
        height: min(320px, 80vw);
    }
    
    .hue-slider-container {
        width: min(40px, 10vw);
        height: min(320px, 80vw);
    }
    
    header h1 {
        font-size: 2.2em;
    }
    
    .questions-section {
        margin-top: 20px;
    }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    .container {
        padding: 20px;
    }
    
    .questions-section {
        margin-top: 25px;
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .copyright {
        margin-top: 25px;
        padding: 18px;
    }
}

@media only screen and (min-device-width: 834px) and (max-device-width: 1194px) {
    .container {
        max-width: 95%;
        padding: 25px;
        margin: 0 auto;
    }
    
    .questions-section {
        margin-top: 30px;
        padding: 25px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .copyright {
        margin-top: 25px;
        padding: 20px;
    }
}

@media (min-width: 1024px) and (max-width: 1366px) {
    .container {
        max-width: 1200px;
        padding: 25px;
    }
    
    .questions-section {
        margin-top: 30px;
        padding: 25px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 20px;
        max-width: 95%;
    }
    
    .main-content {
        gap: 25px;
        max-width: 100%;
    }
    
    .color-section,
    .font-section {
        padding: 20px;
    }
    
    .questions-section {
        padding: 20px;
        margin-top: 25px;
        width: 100%;
    }
    
    .copyright {
        margin-top: 25px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        gap: 15px;
        max-width: 100%;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .color-section,
    .font-section {
        padding: 15px;
        margin: 0;
        width: 100%;
    }
    
    .color-picker-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }
    
    .color-picker {
        width: min(350px, calc(100vw - 60px));
        height: min(350px, calc(100vw - 60px));
    }
    
    .hue-slider-container {
        width: min(350px, calc(100vw - 60px));
        height: 45px;
    }
    
    .hue-cursor {
        width: 12px;
        height: 51px;
        transform: translateX(-50%);
        top: -3px;
        left: auto;
    }
    
    .scheme-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .scheme-btn {
        padding: 10px 15px;
        font-size: 0.9em;
        flex: 0 0 auto;
    }
    
    .font-controls {
        gap: 15px;
        width: 100%;
    }
    
    .font-family-selector,
    .font-size-control,
    .font-weight-control {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }
    
    .font-family-selector label,
    .font-size-control label,
    .font-weight-control label {
        min-width: auto;
        margin-bottom: 5px;
        width: 100%;
    }
    
    #fontSelect,
    #fontWeightSelect,
    #fontSizeSlider {
        width: 100%;
    }
    
    .value-group {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        width: 100%;
    }
    
    .value-group label {
        min-width: auto;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .value-group input {
        width: 100%;
    }
    
    .copy-btn {
        width: 100%;
        padding: 12px 15px;
        margin-top: 5px;
    }
    
    #fontPreviewText {
        width: 100%;
        box-sizing: border-box;
    }
    
    .questions-section {
        padding: 15px;
        margin-top: 15px;
        width: 100%;
    }
    
    .questions-section h2 {
        font-size: 1.5em;
    }
    
    .questions-list {
        margin-left: 15px;
    }
    
    .resources-list {
        margin-left: 15px;
    }
    
    .copyright {
        margin-top: 20px;
        padding: 15px;
        font-size: 0.85em;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 8px;
    }
    
    header {
        margin-bottom: 15px;
    }
    
    header h1 {
        font-size: 1.6em;
        line-height: 1.2;
        word-break: break-word;
    }
    
    .color-section,
    .font-section {
        padding: 12px;
        border-radius: 10px;
    }
    
    .color-section h2,
    .font-section h2 {
        font-size: 1.4em;
        margin-bottom: 12px;
    }
    
    .color-picker {
        width: min(300px, calc(100vw - 50px));
        height: min(300px, calc(100vw - 50px));
    }
    
    .hue-slider-container {
        width: min(300px, calc(100vw - 50px));
        height: 40px;
    }
    
    .color-preview {
        height: 60px;
    }
    
    .scheme-colors {
        justify-content: center;
        gap: 18px;
        margin-bottom: 25px;
    }
    
    .scheme-color {
        width: 35px;
        height: 35px;
    }
    
    .scheme-color::after {
        bottom: -20px;
        font-size: 0.65em;
    }
    
    .scheme-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    #fontPreviewText {
        min-height: 120px;
        padding: 10px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    header h1 {
        font-size: 1.4em;
    }
    
    .color-section,
    .font-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .color-picker {
        width: min(260px, calc(100vw - 40px));
        height: min(260px, calc(100vw - 40px));
    }
    
    .hue-slider-container {
        width: min(260px, calc(100vw - 40px));
        height: 35px;
    }
    
    .scheme-color {
        width: 30px;
        height: 30px;
    }
    
    .scheme-color::after {
        bottom: -18px;
        font-size: 0.6em;
    }
    
    .scheme-colors {
        margin-bottom: 22px;
        gap: 16px;
    }
    
    .scheme-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    #fontPreviewText {
        font-size: 14px;
        min-height: 100px;
        padding: 8px;
    }
    
    .copy-btn {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .color-section h2,
    .font-section h2 {
        font-size: 1.2em;
    }
    
    .questions-section {
        padding: 10px;
        margin-top: 10px;
        width: 100%;
    }
    
    .questions-section h2 {
        font-size: 1.3em;
    }
    
    .resources-section h3 {
        font-size: 1.1em;
    }
    
    .questions-list,
    .resources-list {
        margin-left: 10px;
    }
    
    .copyright {
        padding: 10px;
        font-size: 0.8em;
    }
}

@media (max-width: 360px) {
    header h1 {
        font-size: 1.2em;
    }
    
    .color-section,
    .font-section {
        padding: 8px;
    }
    
    .color-picker {
        width: min(200px, calc(100vw - 25px));
        height: min(200px, calc(100vw - 25px));
    }
    
    .hue-slider-container {
        width: min(200px, calc(100vw - 25px));
        height: 25px;
    }
    
    .scheme-color {
        width: 28px;
        height: 28px;
    }
    
    .scheme-color::after {
        bottom: -16px;
        font-size: 0.55em;
    }
    
    .scheme-colors {
        margin-bottom: 20px;
        gap: 14px;
    }
    
    .copy-btn {
        font-size: 0.85em;
        padding: 8px 10px;
    }
    
    .questions-section {
        padding: 8px;
        margin-top: 10px;
        width: 100%;
    }
    
    .questions-section h2 {
        font-size: 1.2em;
    }
    
    .resources-section h3 {
        font-size: 1.0em;
    }
    
    .copyright {
        padding: 8px;
        font-size: 0.75em;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 3px;
    }
    
    header h1 {
        font-size: 1.1em;
    }
    
    .color-section,
    .font-section {
        padding: 6px;
    }
    
    .color-picker {
        width: min(180px, calc(100vw - 20px));
        height: min(180px, calc(100vw - 20px));
    }
    
    .hue-slider-container {
        width: min(180px, calc(100vw - 20px));
        height: 20px;
    }
    
    .scheme-color {
        width: 25px;
        height: 25px;
    }
    
    .scheme-color::after {
        bottom: -14px;
        font-size: 0.5em;
    }
    
    .scheme-colors {
        margin-bottom: 18px;
        gap: 12px;
    }
    
    .scheme-btn {
        padding: 5px 8px;
        font-size: 0.75em;
    }
    
    #fontPreviewText {
        font-size: 12px;
        min-height: 80px;
        padding: 6px;
    }
    
    .copy-btn {
        padding: 8px;
        font-size: 0.8em;
    }
    
    .color-section h2,
    .font-section h2 {
        font-size: 1.1em;
    }
    
    .questions-section {
        padding: 6px;
        margin-top: 8px;
        width: 100%;
    }
    
    .questions-section h2 {
        font-size: 1.1em;
    }
    
    .resources-section h3 {
        font-size: 0.95em;
    }
    
    .questions-list,
    .resources-list {
        margin-left: 8px;
    }
    
    .copyright {
        padding: 6px;
        font-size: 0.7em;
    }
}

@media (orientation: landscape) and (max-height: 600px) and (min-width: 600px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .color-picker-container {
        flex-direction: row;
        gap: 15px;
    }
    
    .color-picker {
        width: 250px;
        height: 250px;
    }
    
    .hue-slider-container {
        width: 35px;
        height: 250px;
    }
    
    .hue-cursor {
        width: 41px;
        height: 8px;
        transform: translateY(-50%);
        top: auto;
        left: -3px;
    }
    
    .questions-section {
        margin-top: 20px;
        padding: 18px;
    }
    
    .copyright {
        margin-top: 15px;
        padding: 15px;
    }
}

@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .copy-btn {
        display: none;
    }
    
    .scheme-buttons {
        display: none;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.questions-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.questions-section h2 {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.8em;
    border-bottom: 3px solid #6b21a8;
    padding-bottom: 10px;
}

.questions-list {
    list-style: decimal;
    margin-left: 20px;
    margin-bottom: 30px;
}

.questions-list li {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #4a5568;
}

.questions-list li a {
    color: #6b21a8;
    text-decoration: none;
    transition: color 0.3s;
    word-break: break-all;
    overflow-wrap: break-word;
}

.questions-list li a:hover {
    color: #4c1d95;
    text-decoration: underline;
}

.resources-section {
    margin-top: 30px;
}

.resources-section h3 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.3em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.resources-list {
    list-style: disc;
    margin-left: 20px;
}

.resources-list li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #4a5568;
}

.resources-list li a {
    color: #6b21a8;
    text-decoration: none;
    transition: color 0.3s;
    word-break: break-all;
    overflow-wrap: break-word;
}

.resources-list li a:hover {
    color: #4c1d95;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #6b7280;
    font-size: 0.9em;
    border-top: 1px solid #e5e7eb;
}
