/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.title-main {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
}

.title-sub {
    display: block;
    font-size: 2rem;
    font-weight: 300;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-top: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #f0f0f0;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Main Container */
.cipher-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.input-section, .output-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.input-section:hover, .output-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Input Styles */
.input-group {
    margin-bottom: 2rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.text-input, .text-output {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 120px;
}

.text-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
    background: rgba(255, 255, 255, 1);
}

.text-output {
    background: rgba(240, 240, 240, 0.9);
    color: #333;
    cursor: default;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.shift-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shift-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shift-slider {
    flex: 1;
    height: 8px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 20px;
    outline: none;
    -webkit-appearance: none;
}

.shift-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.shift-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.shift-number {
    width: 60px;
    padding: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.shift-number:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

/* Radio Controls */
.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    color: #ffffff;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-color: #ffffff;
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Process Button */
.process-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.process-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.process-btn:active {
    transform: translateY(-1px);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.process-btn:hover .btn-ripple {
    opacity: 1;
}

/* Output Section */
.output-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.copy-btn svg {
    fill: #333;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #ffffff;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-card p {
    line-height: 1.6;
    color: #f0f0f0;
}

/* Credit Section */
.credit-section {
    margin-top: 3rem;
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.credit-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.credit-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 255, 255, 0.03), 
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 6s infinite;
}

.credit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.credit-text {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.credit-icon {
    font-size: 1.3rem;
    margin-right: 0.5rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

.credit-name {
    font-weight: 600;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
    font-size: 1.15em;
}

.credit-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Credit animations */
@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-overlay p {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.5rem;
    }
    
    .cipher-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .controls {
        gap: 1rem;
    }
    
    .credit-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .credit-text {
        font-size: 1rem;
    }
    
    .shift-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shift-number {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .input-section, .output-section {
        padding: 1.5rem;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .credit-card {
        padding: 1.2rem;
        margin: 0 0.5rem;
    }
    
    .credit-text {
        font-size: 0.95rem;
    }
    
    .credit-subtitle {
        font-size: 0.8rem;
    }
} 
